import { RouteRecordRaw } from 'vue-router'
import main from '../components/layout/main.vue';
const menu: Array<RouteRecordRaw> = [
    {
        path: '/login',
        name: 'login',
        meta: {

            title: '登录'
        },
        // component: resolve => require(['@/views/login/index'], resolve)
        component: () => import('../views/login/index.vue')
    },
    {
        path: '/overview',
        name: 'overview',
        component: main,
        meta: {
            title: '经营概况'
        },
        // component: resolve => require(['@/views/overview/index'], resolve)

        children: [
            {
                path: '',
                name: '',
                meta: {
                    requireAuth: true,
                    // title: '经营概况'
                },
                // component: resolve => require(['@/views/set/index'], resolve)
                component: () => import('../views/overview/index.vue')
            }
        ]
    },
    {
        path: '/',
        name: 'Home',
        component: main,
        meta: {
            title: '商城管理',
        }
    },
    /** ********************************** 配送管理******************************/
    {
        path: '/freight',
        name: 'freight',
        meta: {
            title: '配送管理'
        },
        component: main,
        children: [
            {
                path: 'logistics',
                name: 'logistics',
                meta: {
                    requireAuth: true,
                    title: '快递设置'
                },
                // component: resolve => require(['@/views/set/index'], resolve)
                component: () => import('@views/freight/logistics/index.vue')
            }
        ]
    },
    /** ********************************** 设置管理******************************/
    {
        path: '/set',
        name: 'set',
        meta: {
            title: '系统设置'
        },
        component: main,
        children: [
            {
                path: 'setFreight',
                name: 'setFreight',
                meta: {
                    requireAuth: true,
                    title: '快递设置'
                },
                // component: resolve => require(['@/views/set/index'], resolve)
                component: () => import('@views/set/freight.vue')
            }
        ]
    }
]
export default menu